package app;

public class Line {

	private Point beg;
	private Point end;
	
	public double getLength(){
		return Math.sqrt((beg.x-end.x)*(beg.x-end.x) + (beg.y-end.y)*(beg.y-end.y));
	}
	
	public Line(double x1, double y1, double x2, double y2){
		this.beg = new Point(x1, y1);
		this.end = new Point(x2, y2);
	}
	
	public Line(Point beg, Point end) {
		this.beg = beg;
		this.end = end;
	}

	public Point getBeg() {
		return beg;
	}

	public Point getEnd() {
		return end;
	}

	public void setBeg(Point beg) {
		this.beg = beg;
	}

	public void setEnd(Point end) {
		this.end = end;
	}

}
